<!--- SUPPORT ONLINE-->
<noscript>
<style type="text/css">
    .livesupport { display: none }

    .toTop {
        filter: alpha(opacity=100);
        opacity: 1;
    }
</style>
</noscript>
<script type="text/javascript">

    var timeload;

    function hideLive() {
        $('.collapse.expand').parent().stop().animate({'right': -230}, 840, function() {
            $('.collapse.expand').removeClass('expand').parent().animate({'right': -200}, 200);
        });
    }

    $(document).ready(function() {
        var top = ($(window).height() - $('.livesupport').height()) / 2;
        $('.livesupport').css('top', top);
        if ($('.Support_Block').length < 2 && top > 0) {
            $('.livesupport').animate({'opacity': 1}, 400);
        }
        $(".collapse").on("click", function() {

            if ($(this).hasClass("expand")) {
                hideLive();
            } else
                $(this).addClass("expand").parent().stop().animate({'right': 0});

        });
        $('.livesupport.popup').on("mouseover mouseout", function(event) {
            if (event.type == 'mouseover') {
                clearTimeout(timeload);
            }
            if (event.type == 'mouseout') {
                timeload = setTimeout("hideLive()", 8000);
            }
        });
        $(".toTop").on("click", function(event) {
            event.preventDefault();
            var t = $(window).scrollTop();
            $('html,body').stop().animate({scrollTop: 0}, t);
        });
        $(window).scroll(function() {
            var op = $(window).scrollTop() / $(window).height();
            op = op > 1 ? 1 : op;
            $(".toTop").stop().animate({'opacity': op}, 10);
        }).resize(function() {
            var top = ($(window).height() - $('.livesupport').height()) / 2;
            if ($('.Support_Block').length < 2 && top > 0) {
                $('.livesupport').css({'top': top}).show();
            } else {
                $('.livesupport').css({'top': top}).hide();
            }
        });

    });
</script>

<?php if (!empty($hotro)) {
    ?>

    <div class='livesupport popup'>
        <div class='collapse'>
        </div>
        <div class="contentheader">
            <span class="bor side left"></span><span class="bor side right"></span><span class="bor bot"></span>
            <span class="title">
                <?php echo $this->lang->line('hotro'); ?></span>
        </div>
        <div class="Support_Block">
            <?php
            foreach ($hotro as $ht) {
                echo '<div class="row3 rtyoire" ">
                            <span class="item">
                                <div class="title">
                                    ' . $ht->name . '
                                </div>
                                <div class="tel">
                                    Phone: ' . $ht->mobile . '
                                </div>
                                <div class="email">
                                    <p>Yahoo: <a href="ymsgr:sendim?'.$ht->yahoo.'&amp;m=Xin chào"><img style="width:100px;height:20px;" alt="Chat with " src="http://opi.yahoo.com/online?u='.$ht->yahoo.'&amp;m=g&amp;t=2"/></a></p>
                                </div>
                                <div class="email">
                                    <p>Skype:<a href="Skype:' . $ht->skype . '?chat"> <img src="http://mystatus.skype.com/balloon/' . $ht->skype . '"  width="120" height="30" alt="" title="Admin '.$ht->skype.'"/> </a></p>
                                </div>
                        </div>';
            }
            ?>        
            <iframe style='display: none; height: 320px; overflow: hidden; width: 100%;' scrolling="no" frameborder="0"></iframe>
            <div class='btnclose' title='Đóng cửa sổ chat'>
            </div>
            <a class='popout' title='Chuyển sang cửa sổ mới' target="_blank"></a>
        </div>

    </div>
<?php } ?>
<!--- SUPPORT ONLINE-->  